﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcMovie.Controllers
{
    public class HelloWorldController : Controller
    {
        //
        // GET: /HelloWorld/

        public ActionResult Index()
        {
            return View();
        }
        //public string Index()
        //{
        //    return "这是我的<B>默认</B>方法";
        //}

        //public string Welcome()
        //{
        //    return "这是欢迎方法";
        //}
        //public string Welcome(string name, int num = 1)
        //{
        //    return "你好," + name + "," + num + "次";
        //}
        public ActionResult Welcome(string message, int num = 1)
        {
            ViewBag.Message = message;
            ViewBag.Num = num;
            return View();
        } 
    }
}
